package com.spring.demo2.eg1;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;

/**
 * @author vhans
 */
@ComponentScan
public class Test {
    @org.junit.Test
    public void test() {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(Test.class);
        context.getBeansOfType(String.class).forEach((beanName, bean) -> {
            System.out.printf("%s->%s\n",beanName, bean);
        });
    }
}
